#ifndef _INPUT_H_
#define _INPUT_H_

#include <dinput.h>
#include "Sprite.h"

class CInput
{
private:
	LPDIRECTINPUT8 m_pDirectInput;
	LPDIRECTINPUTDEVICE8 m_pKeyboard;
	LPDIRECTINPUTDEVICE8 m_pMouse;

	DIMOUSESTATE m_mouseState;
	DIMOUSESTATE m_oldMouseState;
	unsigned char m_keyboardState[256];
	unsigned char m_oldkeyboardState[256];

	CSprite* m_mouseSprite;
	D3DXVECTOR2 m_mousePos;
	RECT m_screenSize;
	BOOL m_isMouseEnable;
public:
	~CInput(void);
	CInput();
	BOOL Init(HINSTANCE hInst, HWND hWnd);
	BOOL ReadKeyboard();
	/*BOOL ReadMouse();*/
	void Update();
	/*void Draw(LPD3DXSPRITE spriteHandler);*/
	BOOL KeyDown(unsigned char key);
	BOOL KeyUp(unsigned char key);
	BOOL KeyPressed(unsigned char key);
	BOOL KeyReleased(unsigned char key);

	/*BOOL MouseDown(BYTE key);
	BOOL MouseUp(BYTE key);
	BOOL MousePressed(BYTE key);
	BOOL MouseReleased(BYTE key);*/
};
#endif


